﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="modiOrg.aspx.cs" Inherits="org_manOrg_modiOrg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>组织概要</title>
    <link href="../../sys/style/StyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body style="height: 100%">
    <form id="form1" runat="server">
    <div id="main">
        <div id="content">
            
            <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" 
                CellPadding="4" DataKeyNames="organizationid" 
                DataSourceID="SqlDataSource1" Width="80%">
                <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                <RowStyle BackColor="White" ForeColor="#003399" />
                <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                <EmptyDataTemplate>
                    尚未登录
                </EmptyDataTemplate>
                <Fields>
                    <asp:BoundField DataField="organizationid" HeaderText="组织ID" 
                        ReadOnly="True" SortExpression="organizationid" />
                    <asp:BoundField DataField="creator" HeaderText="创建者" 
                        SortExpression="creator" ReadOnly="True" />
                    <asp:BoundField DataField="organizationname" HeaderText="组织名称" 
                        SortExpression="organizationname" />
                    <asp:BoundField DataField="address" HeaderText="组织地址" 
                        SortExpression="address" />
                    <asp:BoundField DataField="postcode" HeaderText="组织邮编" 
                        SortExpression="postcode" />
                    <asp:BoundField DataField="phone" HeaderText="组织电话" SortExpression="phone" />
                    <asp:BoundField DataField="createdtime" HeaderText="创建时间" 
                        SortExpression="createdtime" />
                    <asp:BoundField DataField="contactperson" HeaderText="联系人" 
                        SortExpression="contactperson" />
                    <asp:BoundField DataField="contactemail" HeaderText="联系人E-mail" 
                        SortExpression="contactemail" />
                    <asp:BoundField DataField="description" HeaderText="描述" 
                        SortExpression="description" />
                    <asp:CommandField ShowEditButton="True" 
                        
                        EditText="&lt;img border='0' runat='server' src='../../images/modi...gif' alt='' /&gt;" >
                        <ControlStyle BorderStyle="None" />
                        <FooterStyle BorderStyle="None" />
                        <HeaderStyle BorderStyle="None" />
                    </asp:CommandField>
                </Fields>
                <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                <EditRowStyle Font-Bold="True" ForeColor="#003399" />
            </asp:DetailsView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:appConnectionString %>" 
                
                SelectCommand="SELECT * FROM [organization] WHERE ([creator] = @creator)" 
                DeleteCommand="DELETE FROM [organization] WHERE [organizationid] = @original_organizationid" 
                InsertCommand="INSERT INTO [organization] ([creator], [organizationname], [address], [postcode], [phone], [createdtime], [contactperson], [contactemail], [description]) VALUES (@creator, @organizationname, @address, @postcode, @phone, @createdtime, @contactperson, @contactemail, @description)" 
                OldValuesParameterFormatString="original_{0}" 
                
                UpdateCommand="UPDATE [organization] SET [organizationname] = @organizationname, [address] = @address, [postcode] = @postcode, [phone] = @phone, [createdtime] = @createdtime, [contactperson] = @contactperson, [contactemail] = @contactemail, [description] = @description WHERE [organizationid] = @original_organizationid">
                <SelectParameters>
                    <asp:SessionParameter Name="creator" SessionField="username" Type="String" />
                </SelectParameters>
                <DeleteParameters>
                    <asp:Parameter Name="original_organizationid" Type="Int32" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="creator" Type="String" />
                    <asp:Parameter Name="organizationname" Type="String" />
                    <asp:Parameter Name="address" Type="String" />
                    <asp:Parameter Name="postcode" Type="String" />
                    <asp:Parameter Name="phone" Type="String" />
                    <asp:Parameter Name="createdtime" Type="DateTime" />
                    <asp:Parameter Name="contactperson" Type="String" />
                    <asp:Parameter Name="contactemail" Type="String" />
                    <asp:Parameter Name="description" Type="String" />
                    <asp:Parameter Name="original_organizationid" Type="Int32" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="creator" Type="String" />
                    <asp:Parameter Name="organizationname" Type="String" />
                    <asp:Parameter Name="address" Type="String" />
                    <asp:Parameter Name="postcode" Type="String" />
                    <asp:Parameter Name="phone" Type="String" />
                    <asp:Parameter Name="createdtime" Type="DateTime" />
                    <asp:Parameter Name="contactperson" Type="String" />
                    <asp:Parameter Name="contactemail" Type="String" />
                    <asp:Parameter Name="description" Type="String" />
                </InsertParameters>
            </asp:SqlDataSource>
            
        </div>
    
    </div>
    </form>
</body>
</html>
